const Mock = require("mockjs");
const M = Mock.Random;

/*
const Random = Mock.Random;
例如：M.id()

Basics: boolean, natural, integer, float, character, string, range, date, time, datetime, now
Image:  image, dataImage
Color:  color
Text: paragraph, sentence, word, title
Name: first, last, name
Web:  url, domain, email, ip, tld
Address:  area, region
Helpers:  capitalize, upper, lower, pick, shuffle
Miscellaneous:  guid, id
*/

module.exports = {
  /*###################################
   模拟接口
  //###################################*/
  "/template": Mock.mock({
    message: null,
    result: "success",
    data: 0,
    code: 0,
    success: true
  }),
  "/user": Mock.mock({
    message: '错误信息',
    result: "success",
    data: {
      key: M.id(),
      key2: M.id(),
    },
    code: 0,
    success: true
  })
};
